package top.chengdongqing.mishop.media.banner

import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import top.chengdongqing.mishop.enums.BannerType

@RestController
@RequestMapping("/banners")
class BannerController(
    private val bannerService: BannerService
) {

    @GetMapping("/{type}")
    fun findBanners(@PathVariable type: BannerType): List<BannerVO> {
        return bannerService.findBanners(type)
    }
}